//
//  StockAnalysisViewController.h
//  ShoppingExperience
//
//  Created by LiYinDi on 15/7/15.
//  Copyright (c) 2015年 RuiBen. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>
@protocol ScanHomeDelegate;
@interface ScanHomeViewController : UIViewController<AVCaptureMetadataOutputObjectsDelegate>

{
    BOOL isDown;
    int num;
   // NSTimer * timer;
    NSString *stringValue;
}
@property(nonatomic)NSTimer *timer;
@property(nonatomic,strong)NSString *scanTypeStr;

@property(weak, nonatomic)IBOutlet UILabel *lineLabel;
@property(weak, nonatomic)IBOutlet UIButton *viewContainer;
@property(weak, nonatomic)IBOutlet UIView *searchViewContainer;


@property(weak, nonatomic)IBOutlet UITextField *searchTextField;

@property(weak, nonatomic)IBOutlet UIButton *scanMemberBtn;
@property(weak, nonatomic)IBOutlet UIButton *scanShopBtn;
@property(weak, nonatomic)IBOutlet UIButton *scanStockBtn;
@property(weak, nonatomic)IBOutlet UIImageView *lightImageView;
@property(weak, nonatomic)IBOutlet UILabel *scanCountLabel;
@property(weak, nonatomic)IBOutlet UIButton *scanStockCountBtn;
@property(weak, nonatomic)IBOutlet UIImageView *bgImageView;
//@property(weak, nonatomic)  UIButton *scanCancelBtn;
@property(nonatomic) BOOL isReading;
@property(nonatomic,strong) AVCaptureSession *captureSession;
@property(nonatomic,strong) AVCaptureVideoPreviewLayer *videoPreviewLayer;
@property(nonatomic,weak) id<ScanHomeDelegate> delegate;
@end
@protocol ScanHomeDelegate <NSObject>
@optional
-(void)scanHomeMemberResult:(NSString *)codeStr;
-(void)scanHomeShopResult:(NSString *)codeStr;

-(void)scanHomeStockResult;
-(void)scanHomeCancelClick;

@end
